<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title></title>

<link href='/flower/Public/Member/css/global.css' rel='stylesheet' type='text/css' />


<!-- 整体页面布局 -->
<link href='/flower/Public/Member/css/main.css' rel='stylesheet' type='text/css' />

<!-- 基础js调用 -->
<script type='text/javascript' src='/flower/Public/Member/js/jquery-1.7.2.min.js'></script>
<script type='text/javascript' src='/flower/Public/Member/js/global.js'></script>


<link href='/flower/Public/Member/css/wechat.css' rel='stylesheet' type='text/css' />
<script type='text/javascript' src='/flower/Public/Member/js/wechat.js'></script>
<script type="text/javascript" src="/flower/Public/Member/js/operamasks-ui.min.js"></script>
<script type="text/javascript" src="/flower/Public/Member/js/coupon.js"></script>
<script type='text/javascript'>
var web_domain='/flower';
var static_domain='/flower';
var img_domain='/flower';
var _PUBLIC_ = '/flower/Public';
var _FILE_ = '<?php echo U('Index/ajaxFileUpload');?>';
var domain={
        www:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        static:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        img:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        file:'<?php echo C('WEB_ABSOLUTE_URL');?>',
        kf:'<?php echo C('WEB_ABSOLUTE_URL');?>'
};
</script>

<script language="javascript">
     /* $(document).ready(wechat_obj.set_token_init); */
</script>

</head>

<body>
	
	
	<div id="iframe_page">
		<div class="iframe_content">
			<div class="r_nav">
				<ul>
				<li class="<?php if((ACTION_NAME) == "coupon"): ?>cur<?php endif; ?>"><a href="<?php echo U('Coupon/coupon');?>">优惠券列表</a></li>
				<!-- <li class="<?php if((ACTION_NAME) == "review"): ?>cur<?php endif; ?>"><a href="<?php echo U('Review/review');?>">评论列表</a></li> -->
				</ul>
			</div>

		
		

			
	<div id="scratch" class="r_con_wrap">
	<div class="control_btn">
		<a href="<?php echo U('coupon/couponAdd',array('type'=>1));?>" class="btn_green btn_w_120">添加期限优惠券</a><div class="tips"></div>
		<a href="<?php echo U('coupon/couponAdd',array('type'=>2));?>" class="btn_green btn_w_120">添加兑换优惠券</a><div class="tips"></div>
		<a href="<?php echo U('coupon/couponAdd',array('type'=>3));?>" class="btn_green btn_w_120">添加首关优惠券</a><div class="tips"></div>
	</div>
	
	<table class="r_con_table" border="0" cellpadding="5" cellspacing="0">
		<thead>
			<tr>
				<td width="5%">序号</td>
				<td width="15%">优惠券名称</td>
				<td width="10%">类型</td>
				<td width="8%">价值</td>
				<td width="8%">满减限制</td>
				<td width="10%">所需积分</td>
				<td width="10%">有效期</td>
				<td width="10%">领取人数</td>
				<td width="10%">发布时间</td>
				<td class="last" width="15%">操作</td>
			</tr>
		</thead>
		<tbody> 
		<?php if(is_array($couponList)): foreach($couponList as $key=>$vo): ?><tr>
					<td>
					<?php echo ($key+1); ?>
					</td>
					<td><?php echo ($vo["coupon_name"]); ?></td>
					<td><?php echo ($vo["coupon_type"]); ?></td>
					<!-- <td><?php echo ($vo["coupon_etime"]); ?></td> -->
					<td><?php echo ($vo["coupon_price"]); ?></td>
					<td><?php echo ($vo["coupon_num"]); ?></td>
					<td>满<?php echo ($vo["coupon_rule"]); ?>后可使用</td>
						<!-- <?php if($vo['status'] == 0): ?><td>未到期
					</td>
						<?php elseif($vo['status'] == 1): ?><td>已到期
					</td><?php endif; ?> -->
					<td><a href="<?php echo U('coupon/addcoupon',array('id'=>$vo['id']));?>"><img src="/flower/Public/member/images/ico/view.gif"></a>
            			<a href="<?php echo U('coupon/delcoupon',array('id'=>$vo['id']));?>"  onclick="return confirm('确认删除么？删除后将不可恢复！')"><img src="/flower/Public/member/images/ico/del.gif"></a>
            		</td>

			</tr><?php endforeach; endif; ?>	
		</tbody>
	</table>
</div>
<div id="turn_page">
		<?php echo ($page); ?>
	</div>

			
			</div>
			</div>
</body>
</html>